// 医院相关API服务
const request = require('../utils/request');

// 获取医院基本信息
const getHospitalInfo = () => {
  return request.get('/hospital/info');
};

// 获取医生列表
const getStaffList = (departmentId = null, page = 1, size = 10) => {
  const params = { page, size };
  if (departmentId) {
    params.departmentId = departmentId;
  }
  return request.get('/hospital/staff', params);
};

// 获取医生详情
const getStaffDetail = (id) => {
  return request.get(`/hospital/staff/${id}`);
};

// 添加评价
const addReview = (data) => {
  return request.post('/review', data);
};

// 获取医生评价列表
const getStaffReviews = (staffId, page = 1, size = 10) => {
  return request.get(`/hospital/review/staff/${staffId}`, { page, size });
};

module.exports = {
  getHospitalInfo,
  getStaffList,
  getStaffDetail,
  addReview,
  getStaffReviews
}; 